home *** CD-ROM | disk | FTP | other *** search
- Path: news.informatik.uni-kiel.de!usenet
- From: Steffen Boerm <sbo@numerik.uni-kiel.de>
- Newsgroups: comp.lang.c++
- Subject: Different "new" in g++ and TC++
- Date: Thu, 14 Mar 1996 16:19:54 +0100
- Organization: Mathematisches Seminar, Bereich 2, Uni Kiel, Deutschland
- Message-ID: <3148391A.4646@numerik.uni-kiel.de>
- NNTP-Posting-Host: newton.informatik.uni-kiel.de
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (X11; I; SunOS 5.5 sun4m)
-
- Hi,
-
- when A is a class with constructor A::A() and n is an
- integer, apparently g++ and TC++ 3.0 do different jobs
- on the expression "new A[n]": TC++ calls the constructor
- apparently for every created object, while g++ does not.
-
- Who's wrong? I'd expect TC++ to be correct since it
- would look strange to me that there was a way in C++
- to create objects without the use of constructors ;-)
-
- Best regards, Steffen 8-)
-